package vip.zslaa.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import vip.zslaa.entity.User;
import vip.zslaa.mybatis.UserMapper;

import java.util.List;

/**
 * @author ：zslaa
 * @date ：Created in 9/5/2019 2:15 PM
 * @description：user数据的增删改查
 * @version: 1.0$
 */
@Controller
public class UserController {
    @Autowired
    private UserMapper userMapper;

    @RequestMapping("/selectUser")
    @ResponseBody
    public List<User> selectUser(){
        List<User> users = userMapper.selectUser();
        System.out.println(users.toString());
        return users;
    }
}
